<template>
  <content-base>
    {{list}}
  </content-base>
</template>

<script>
import ContentBase from "@/components/ContentBase";
import { ref } from "vue";
import word from "@/api/word";

export default {
  name: "RegisterView",
  components: {
    ContentBase
  },

  setup() {
    let list = ref([]);

    word.getWordList().then(res => {
        list.value = res.data.wordsList;
        console.log(list);
      });

    const test = () => {
      word.getWordList().then(res => {
        list.value = res.data.wordsList;
        console.log(list);
      });
    };

    return {
      test,
      list
    };
  }
};
</script>

<style>
</style>
